package com.lwl.office.webeditor.config;

import lombok.Data;

@Data
public class HeaderConfig {
    public static String name="标题";
    private int spacingBefore;
    private int spacingAfter;
    private int spacingLine;
    private int kern;
    private int sz;
    private int szCs;

    public HeaderConfig(int spacingBefore, int spacingAfter, int spacingLine, int kern, int sz, int szCs) {
        this.spacingBefore = spacingBefore;
        this.spacingAfter = spacingAfter;
        this.spacingLine = spacingLine;
        this.kern = kern;
        this.sz = sz;
        this.szCs = szCs;
    }

    public static HeaderConfig of(int level){
        switch (level){
            case 1:
                return new HeaderConfig(340,330,578,44,44,44);
            case 2:
                return new HeaderConfig(260,260,416,32,32,32);
        }
        return new HeaderConfig(340,330,578,32,32,32);
    }
}
